1. Field
One embodiment of the invention relates to a disk controller that writes data to a sector of a disk medium, a disk drive device, and a disk control method.
2. Description of the Related Art
Magnetic disk devices have been used to store video data and audio data.
With the progress of computer technology, the faster write speed is increasingly required of such a magnetic disk device.
Besides, a long sector format is used as a result of an increase in the capacity of the magnetic disk device. Accordingly, a sector format is used in which a data length is longer than a unit of data exchanged between the magnetic disk device and a host.
Upon receipt of a command to write data that satisfies the physical sector size, the data is written to the magnetic disk device. On the other hand, in response to a command to write data that does not satisfy the physical sector size, a read-modify-write (RMW) operation is performed. Frequent RMW operations cause a delay in write speed.
Because of this, the RMW operation needs to be performed at an appropriate timing. Specifically, when the RMW operation is performed immediately after the receipt of a command to write fraction data (fraction write command) that does not satisfy the physical sector size, if the address of the subsequent write command is sequential, wasteful media access increases. This degrades the sequential write performance.
Recent technologies proposed in relation to the magnetic disk device take into account a command interval. According to such a technology, upon receipt of a write command that does not satisfy the physical sector size, the next write command is waited for a predetermined time. If a sequential write command is received during the wait time, a disk write operation is continued without performing an RMW operation. The disk write operation is changed to the RMW operation if a non-sequential write command is received.
This reduces RMW operations at sequential access in the magnetic disk device and prevents the performance degradation.
Japanese Patent Application Publication (KOKAI) No. 2001-209500 discloses a conventional technology in which if a new write command is received after a write command in response to which disk access has started, a disk write operation is performed by combining write data. Thus, the processing time delay is avoided.
In the conventional technology in which a disk write operation is continued without performing an RMW operation when a sequential write command is received during the wait time and the disk write operation is changed to the RMW operation when a non-sequential write command is received, the wait time is simply determined based on the command interval. Therefore, wasteful rotational latency occurs during a period from the preparation of an RMW operation to actual access, and thereby the performance degrades at the time of random access.
The conventional technology disclosed in Japanese Patent Application Publication (KOKAI) No. 2001-209500 does not take into account the timing to start disk access. Accordingly, rotational latency may occur depending on the timing.